home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fatted Calf
/
The Fatted Calf.iso
/
Applications
/
Utilities
/
BackSpace
/
Source
/
BlackView.m
< prev
next >
Wrap
Text File
|
1993-07-14
|
1KB
|
45 lines
// BlackView.m
//
// You may freely copy, distribute, and reuse the code in this example.
// NeXT disclaims any warranty of any kind, expressed or implied, as to its
// fitness for any particular use.
#import "BlackView.h"
#import <math.h>
#import <libc.h>
#import <dpsclient/wraps.h>
@implementation BlackView
// This is a really simple View that makes the screen totally black
// BackSpace wasn't really designed for this, so oneStep still gets
// invoked. By sleeping, we insure that this doesn't suck too
// many cycles. Has to wake often enough to remain moderately
// responsive to events.
- oneStep
{
usleep(1000000 * 1/2 ); //sleep a while (yuck!)
// this time should be short enough that BackSpace remains
// somewhat responsive if an event does occur. Unfortunately,
// waking up keeps BackSpace hotter than I would prefer (ie paged in)
return self;
}
- drawSelf:(const NXRect *)rects :(int)rectCount
{
//Actually, this method doesn't have to do anything at all since
// the view is placed in a black window...
return self;
}
- (BOOL)isBoringScreenSaver
{
return YES;
}
@end